package cn.jingzhuan.element.demo.view.activity

import android.app.ActivityOptions
import android.content.Intent
import android.os.Bundle
import android.view.View
import cn.jingzhuan.element.demo.view.BaseActivity
import cn.jingzhuan.element.element.R


class SharedElementActivityTo : BaseActivity () {
    override fun getLayoutId(): Int = R.layout.activity_shared_element_to

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getLayoutId())
        findViewById<View>(R.id.secondSharedView).setOnClickListener {
            startActivity(Intent(baseContext, SharedElementActivity::class.java), ActivityOptions.makeSceneTransitionAnimation(this, this.findViewById(R.id.secondSharedView), "sharedView").toBundle())
        }
    }

}